package com.wms.service.impl;

import com.wms.dao.MenuDao;
import com.wms.model.Menu;
import com.wms.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.Serializable;
import java.util.List;

/**
 * @author This
 * @version 1.0
 * @code MenuServiceImpl 导航服务类
 * @date 2019/7/14 11:55
 * @since 1.7
 */
@Service
@Transactional
public class MenuServiceImpl implements MenuService {

    @Autowired
    private MenuDao dao;

    /**
     * 批量插入
     *
     * @param menuList 导航集合
     */
    @Override
    public void addAll(List<Menu> menuList) {
        dao.insertAll(menuList);
    }

    @Override
    public boolean add(Menu menu) {
        return false;
    }

    @Override
    public void delete(Menu menu) {

    }

    @Override
    public void edit(Menu menu) {

    }

    @Override
    public Menu find(Serializable id) {
        return null;
    }

    @Override
    public void deleteAll(String ids) {

    }

    @Override
    public int count(String condition) {
        return (dao.count(new Menu(), condition)).intValue();
    }

    @Override
    public List<Menu> findAll() {
        return dao.findAll();
    }
}
